import { Observable, Subject } from "rxjs";

export class Store<T> {
	state$: Observable<T>;
	private _state$: Subject<T>;

	constructor () {
			this._state$ = new Subject();
			this.state$ = this._state$.asObservable();
	}

	setState(nextState: T): void {
			this._state$.next(nextState);
	}
}